package com.usian.controller;

import com.usian.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AccountController {

    @Autowired
    private AccountService accountService;


    /**
     * 扣减账户余额
     *
     * @param userId
     * @param money
     * @return
     */
    @RequestMapping("/deduction")
    public boolean deduction(@RequestParam Integer userId,@RequestParam Integer money){
        return accountService.deduction(userId,money);
    }
}
